package com.example.mydemo.mydemo1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Service {
     @Autowired
     private myImplements myImplements;
     public Service(myImplements myImplements) {
        this.myImplements = myImplements;
    }
    public void startRun(){
        System.out.println("正在使用的是"+ myImplements);
        myImplements.run();
    }

}
